//该文件为 users 创建约束条件与模型对象

//引入mongoose
const mongoose = require('mongoose');

//创建约束条件
const Schema = mongoose.Schema;
const usersSchema = Schema({
    user_name:{
        type:String,
        unique:true,
        required:true
    },
    password:{
        type:String,
        unique:true,
        required:true,
        default:123
    }
});
//创建模型对象
module.exports = mongoose.model('users',usersSchema);
